package com.johnny.cms.core.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.johnny.cms.core.manager.trans.NOBManager;
import com.johnny.core.hibernate.orm.IProperyFilter;
import com.johnny.core.hibernate.orm.Page;
import com.johnny.lang.KeepService;
import com.johnny.nob.domain.NboContact;
import com.johnny.nob.domain.NboEnquiry;
import com.johnny.nob.domain.NboMailList;

@Component
@KeepService
public class CmsNOBService {
	@Autowired
	private NOBManager nobManager;

	public void createNobContact(NboContact contact) {
		nobManager.saveNobContact(contact);
	}

	public void findNobContactByPage(Page<NboContact> page,
			List<IProperyFilter> rules) {
		nobManager.findNobContactByPage(page, rules);

	}

	public void createNobEnquiry(NboEnquiry nobEnquiry) {
		nobManager.saveNobEnquiry(nobEnquiry);

	}

	public void findNobEnquiryByPage(Page<NboEnquiry> page,
			List<IProperyFilter> rules) {
		nobManager.findNobEnquiryByPage(page, rules);
	}

	public List<NboContact> getAllNobContacts() {

		return nobManager.getAllNobContacts();
	}

	public void findNobMailListByPage(Page<NboMailList> page,
			List<IProperyFilter> rules) {
		nobManager.findNobMailListByPage(page, rules);

	}

	public void createNboMailList(NboMailList nboMailList) {
		nobManager.saveNboMailList(nboMailList);

	}

	public List<NboMailList> getAllNboMailList() {
	 
		return nobManager.getAllNboMailList();
	}

}
